<?php
class Subject_model extends CI_Model{
	function subject_list(){
		$where = " status = 1 ";
		$sql = "SELECT id,name,img FROM {$this->db->dbprefix}b_subject WHERE $where order by sort desc";
		$result = $this->db->query($sql)->result_array();
		return $result;
	}

	function get_subject_list_by_ids($ids){
		$sql = "SELECT id,name,img FROM {$this->db->dbprefix}b_subject WHERE id IN($ids) order by sort desc";
		$result = $this->db->query($sql)->result_array();
		return $result;
	}
}